﻿<UserControl x:Class="iMagistic.SizeSelector"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="250" d:DesignWidth="350" SizeChanged="UserControl_SizeChanged">
    <UserControl.Resources>

        <ControlTemplate x:Key="Btn" TargetType="{x:Type Button}">
            <Grid  Name="GridCnns"  Background="#4FFFFFFF" >
                <Border Name="BtnBorder" BorderThickness="0" BorderBrush="Black">
                    <Label Foreground="Black" HorizontalAlignment="Right" VerticalAlignment="Top" FontSize="16" FontWeight="Normal" Background="WhiteSmoke" >
                        <ContentPresenter VerticalAlignment="Top" HorizontalAlignment="Right"  x:Name="contentPresenter" Margin="10,0,10,0" />
                    </Label>
                </Border>
            </Grid>
            <ControlTemplate.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Background" Value="#4F7B0E77" TargetName="GridCnns"/>
                    <Setter Property="BorderThickness" Value="2" TargetName="BtnBorder"/>
                </Trigger>
                <Trigger Property="IsPressed" Value="True">
                    <Setter Property="BorderBrush" Value="#FFF3F3F3" TargetName="BtnBorder"/>
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>

    </UserControl.Resources>
    <Grid Name="SelectorCanvas" Background="Black">
        <Button Name="Btn20X30"  Template="{DynamicResource Btn}" Content="20X30" HorizontalAlignment="Left" VerticalAlignment="Bottom"  Click="Selected_Click" Height="250" Width="350" />
        <Button Name="Btn15X21"  Template="{DynamicResource Btn}" Content="15X21" HorizontalAlignment="Left" VerticalAlignment="Bottom"  Click="Selected_Click" Height="200" Width="300"/>
        <Button Name="Btn13X18"  Template="{DynamicResource Btn}" Content="13X18" HorizontalAlignment="Left" VerticalAlignment="Bottom"  Click="Selected_Click" Height="150" Width="250" />
        <Button Name="Btn10X15"  Template="{DynamicResource Btn}" Content="10X15" HorizontalAlignment="Left" VerticalAlignment="Bottom"  Click="Selected_Click" Height="100" Width="200" />
        <Button Name="Btn09X13"  Template="{DynamicResource Btn}" Content="09X13" HorizontalAlignment="Left" VerticalAlignment="Bottom"  Click="Selected_Click" Height="50" Width="150"/>
    </Grid>
</UserControl>
